package test.spring.boot.oauth.github;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.http.HttpEntity;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;

import java.util.HashMap;
import java.util.Map;

/**
 * @author ZCW
 * @createTime 2017/12/5
 * @lastUpdateTime 2017/12/5 ZCW
 */
@SpringBootApplication
public class Application {
    public static void main(String[] args) {
//        SpringApplication.run(Application.class, args);


        String url = "https://www.baidu.com/s?wd={keywords}";

        Map<String,String> var = new HashMap();
        var.put("keywords","java 发送http请求");

        ResponseEntity<String> result = new RestTemplate().getForEntity(url, String.class,var);

    }

}
